angular.module('ranking_listApp', [])
    .controller('ranking_listCtrl', ['$scope', '$http', function ($scope, $http) {
        $scope.title = 'home page controller.';
        $scope.data = [];
        $scope.isHot = true;
        getHotData();
        $scope.getHot = function () {
            getHotData();
            $scope.isHot = true;
        };
        $scope.getClassify = function () {
            $scope.isHot = false;
            $http({
                type: 'get',
                url: 'src/data/classifyData.json'
            }).then(function (value) {
                $scope.data = value.data;
            })
        };

        function getHotData() {
            $http({
                type: 'get',
                url: 'src/data/rankData.json'
            }).then(function (value) {
                $scope.data = value.data;
            })
        }
    }]);